package com.caoheng.pay.pay.channel;

import com.alibaba.fastjson.JSONObject;
import com.caoheng.core.common.body.WechatPayResponseBody;
import com.caoheng.pay.pay.channel.wrap.request.WechatPayRequestParam;

/**
 * @ClassName WechatPayChannel
 * @Description TODO
 * @Author shuimodanqing
 * @Date 2018/12/20 1:16 PM
 */
public class WechatPayChannel implements PayChannel {

    @Override
    public <E> E executeForPay(JSONObject jsonObject) {
        return null;
    }

    @Override
    public void executeForRefund() {

    }

    @Override
    public void executeForRefundQuery() {

    }

    @Override
    public void executeForPayOrderQuery() {

    }

    private <T> T buildRequestParamForPay(JSONObject param){
        WechatPayRequestParam.Builder builder = new WechatPayRequestParam.Builder();
        builder.appId(param.getString("appId"))
                .body(param.getString("body"))
                .deviceInfo(param.getString("deviceInfo"))
                .mchId(param.getString("mchId"))
                .outTradeNo(param.getString("outTradeNo"))
                .totalFee(param.getString("total"))
                .notifyUrl(param.getString("notifyUrl")).build();
    }
}
